package itsm.isperp.job;

import itsm.isperp.framework.core.context.ContextHolder;
import itsm.isperp.module.service.slm.SlmServiceAgreementManualService;
import itsm.isperp.workflow.service.BpmProcessRunService;

import java.util.List;
import java.util.Map;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

/**
 * 
 * 
 * 
 * @author lizx
 * @date 2015-6-30
 * @since 1.0
 * 
 */
@Service
public class SetSolveTimeCostJob implements Job {

	public static final Logger logger = LoggerFactory
			.getLogger(SetSolveTimeCostJob.class);

	@Override
	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		try {
			SlmServiceAgreementManualService.resetTimeDuration("icd_incident", "assign_date", "solved_date", "solve_timecost", " (assign_date is not null and solved_date is not null and solve_timecost is null)");
		} catch (Exception e) {
			logger.error("计算处理时长失败，原因是：" + e.getMessage(), e);
		}


	}

	
}
